Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@uiw/utils
Advanced tools
@uiw/utils
npm i @uiw/utils
import { isLeapYear, solarMonthDays } from '@uiw/utils';
Determine whether it is a leap year
const isLeapYear = (year: number) => {
if (year % 4 === 0 && year % 100 !== 0) return true;
else if (year % 400 === 0) return true;
return false;
};
The first day of the month is the day of the week.
new Date(2021,6,1).getDay() // => 4
Get the sun moon, commonly known as the solar calendar month By calculating the second month of the leap year, maybe 29
days
new Date(2021,6,0).getDate() // => 30
Check if a date is the same as another date. Use Date.prototype.toISOString()
and strict equality checking (===
) to check if the first date is the same as the second one.
new Date(2021,6,1).toISOString() === new Date(2021,6,1).toISOString() // => true
Gets the scroll value of the given element in the given side (top and left)
randomid()
// "5fan4z7qsa"
FAQs
utils tools for uiw
The npm package @uiw/utils receives a total of 677 weekly downloads. As such, @uiw/utils popularity was classified as not popular.
We found that @uiw/utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.